import Vue from 'vue'
import Vuex from 'vuex'
import add from './Module/add'
import createPersistedState from "vuex-persistedstate";
Vue.use(Vuex)
export default new Vuex.Store({
    state: {},
    getters: {
        addList: (state) => state.add.list,
    },
    mutations: {},
    actions: {},
    modules: {
        add,
    },
    plugins: [
        createPersistedState({
          key: "myvuex",
          paths: ["add"],
          // reducer(state) {
          //   return {
          //     user: {
          //       token: state.user.token,
          //     },
          //   };
          // },
          storage: window.sessionStorage,
        }),
      ],
})